using System;
using System.Collections.Generic;
using System.Text;
using System.Data;

namespace StudentManagementApplication.Business
{
    public class PersonService
    {
        private DAO.PersonDAO personDAO = new DAO.PersonDAO();

        public void InsertPerson(Entities.Person person)
        {
            personDAO.InsertPerson(person);
        }

        public void UpdatePerson(Entities.Person person)
        {
            personDAO.UpdatePerson(person);
        }

        public void DeletePerson(string sPersonID)
        {
            personDAO.DeletePerson(sPersonID);
        }

        public Entities.Person GetNewPersonID()
        {
            return personDAO.GetNewPersonID();
        }

        public Entities.Person GetPersonByPersonID(string sPersonID)
        {
            return personDAO.GetPersonByPersonID(sPersonID);
        }

        public Entities.Person GetPersonByLoginID(string sLoginID)
        {
            return personDAO.GetPersonByLoginID(sLoginID);
        }

        public List<Entities.Person> GetPersonWithRoleID(string sRoleID)
        {
            return personDAO.GetPersonWithRoleID(sRoleID);
        }

        public List<Entities.Person> GetPersonExceptRoleID(string sRoleID)
        {
            return personDAO.GetPersonExceptRoleID(sRoleID);
        }

        public List<Entities.Person> GetPersonWithClassID(string sClassID)
        {
            return personDAO.GetPersonWithClassID(sClassID);
        }

        public List<Entities.Person> GetTrainerByClassID(string sClassID)
        {
            return personDAO.GetTrainerByClassID(sClassID);
        }

        public List<Entities.Person> GetAllPersons()
        {
            return personDAO.GetAllPersons();
        }
    }
}
